package pjwstk.jps.interpreter.qres;

import java.util.Stack;

import pjwstk.jps.result.IAbstractQueryResult;


/**
 * @author s9111_s10304
 *
 */
public class QResStack implements IQResStack
{
    private Stack<IAbstractQueryResult> stack = new Stack<IAbstractQueryResult>();
    
    @Override
    public void push(IAbstractQueryResult value) {
        stack.push(value);
    }
    
    @Override
    public IAbstractQueryResult pop() {
        return stack.empty() ? null : stack.pop();
    }

    public IAbstractQueryResult peek() {
        return stack.peek();
    }
}